package br.com.gtoolz.myimc.work;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import br.com.gtoolz.myimc.CalculoCaloriasActivity;
import br.com.gtoolz.myimc.CalculoDoImcActivity;
import br.com.gtoolz.myimc.ListaResultadosActivity;
import br.com.gtoolz.myimc.ListaResultadosCalActivity;
import br.com.gtoolz.myimc.R;

public class IconesClicaveisWork {

	Activity activity;
	private TextView balanca;
	private TextView clipImc;
	private TextView talher;
	private TextView clipCal;

	public IconesClicaveisWork(Activity painelActivity) {
		this.activity = painelActivity;
	}
	
	public void implementar() {
		/**
		 * Implementa os listeners da PainelActivity
		 */
		this.balanca = (TextView) activity.findViewById(R.id.tv_calcular_imc);
		balanca.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent irParaCalculoDoImc = new Intent(activity, CalculoDoImcActivity.class);
				activity.startActivity(irParaCalculoDoImc);
			}
		});
		
		this.clipImc = (TextView) activity.findViewById(R.id.tv_historico_imc);
		clipImc.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent irParaListaDeResultados = new Intent(activity, ListaResultadosActivity.class);
				activity.startActivity(irParaListaDeResultados);
			}
		});
		
		this.talher = (TextView) activity.findViewById(R.id.tv_calcular_cal);
		talher.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent irParaCalculoCalorias = new Intent(activity, CalculoCaloriasActivity.class);
				activity.startActivity(irParaCalculoCalorias);
			}
		});
		
		this.clipCal = (TextView) activity.findViewById(R.id.tv_historico_cal);
		clipCal.setOnClickListener(new OnClickListener() {	
			@Override
			public void onClick(View v) {
				Intent irParaListaDeResultadosCal = new Intent(activity, ListaResultadosCalActivity.class);
				activity.startActivity(irParaListaDeResultadosCal);
			}
		});
	}
	
}
